package com.gradle.bean.user;

import lombok.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @NotNull(message = "用户id不能为空")
    private Long id;
    @NotBlank(message = "用户姓名不能为空")
    private String userName;
    @NotNull(message = "用户年龄不能为空")
    private int age;
    @NotBlank(message = "用户地址不能为空")
    private String address;
}